﻿using System;

namespace Sigil.NonGeneric
{
	public partial class Emit
	{
		/// <summary>
		/// Pops a pointer from the stack and pushes the value (of the given type) at that address onto the stack.
		/// </summary>
		public Emit LoadIndirect<Type>(Boolean isVolatile = false, Int32? unaligned = null)
		{
			InnerEmit.LoadIndirect<Type>(isVolatile, unaligned);
			return this;
		}

		/// <summary>
		/// Pops a pointer from the stack and pushes the value (of the given type) at that address onto the stack.
		/// </summary>
		public Emit LoadIndirect(Type type, Boolean isVolatile = false, Int32? unaligned = null)
		{
			InnerEmit.LoadIndirect(type, isVolatile, unaligned);
			return this;
		}
	}
}